<?php
class M_cart extends CI_Model {
	
	public function addToCart($values)
	{
		$this->db->query("SELECT quantity FROM cart WHERE productid = '".$values['productid']."' AND '".$values['userid']."' ");
		$this->db->insert('cart', $values);
		return $this->db->affected_rows() > 0 ? TRUE : FALSE;
	}
}
?>